%ifndef BOOT_MEMORY_COPYMEMORY
%define BOOT_MEMORY_COPYMEMORY
; CopyMemory(LPBYTE lpDst, LPBYTE lpSrc, DWORD dwLen)
%define lpDst dword [ebp + 36]
%define lpSrc dword [ebp + 40]
%define dwLen dword [ebp + 44]

bits 32
Boot.Memory.CopyMemory:
    pusha
    mov ebp, esp
    mov esi, lpSrc
    mov edi, lpDst
    mov ecx, dwLen
Boot.Memory.CopyMemory.Loop:
    rep movsb
Boot.Memory.CopyMemory.Return:
    popa
    ret
%undef lpDst
%undef lpSrc
%undef dwLen
%endif